package com.heima.behavior.controller;

import com.heima.behavior.dtos.ReadBehaviorDto;
import com.heima.behavior.service.ReadBehaviorService;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 阅读行为控制器
 *
 * @author DiXiaoNie
 * @date 2023/01/03
 * @since 2023/1/3 15:54
 */
@RestController
@RequestMapping("/api/v1/read_behavior")
public class ReadBehaviorController {
    @Autowired
    private ReadBehaviorService readBehaviorService;

    /**
     * 读
     *
     * @param dto dto
     * @return {@link ResponseResult }
     * @author DiXiaoNie
     * @date 2023/01/03
     */
    @PostMapping
    public ResponseResult read(@RequestBody ReadBehaviorDto dto) {
        return this.readBehaviorService.read(dto);
    }
}
